package com.service.impl;

import com.mapper.ApplyChildMapper;
import com.pojo.ApplyChild;
import com.service.ApplyChildService;
import com.util.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("applyChildService")
public class ApplyChildServiceImpl implements ApplyChildService {
    @Resource
    private ApplyChildMapper applyChildMapper;

    @Override
    public List<ApplyChild> searchByApplyChild(String id) {
        return applyChildMapper.searchByApplyChild(id);
    }

    @Override
    public Pager<ApplyChild> searchApplyChild(Pager pager,String no) {
        pager.setRows(applyChildMapper.searchApplyChild(no));
        pager.setTotal(applyChildMapper.total(no));
        return pager;
    }

    @Override
    public int del(String id) {
        return applyChildMapper.del(id);
    }

    @Override
    public int add(ApplyChild applyChild) {
        return applyChildMapper.add(applyChild);
    }

    @Override
    public int update(ApplyChild applyChild) {
        return applyChildMapper.update(applyChild);
    }
}
